/* $RCSFile: InitCrm2.2.2.0000.sql $
 Apache license v2 2011 by Christian Surieux
 Removing this comment is forbiddden
 $Source: ?/AddonNice/Setup/Scripts/InitCrm2.2.2.0000.sql $
 $log$
 Revision 37 2010/08/09 12:26:56  christian.surieux
   Adding Log comment to sql files
*/
------------------------
-- InitCrm2.2.2.0000.sql
------------------------
-- Init the Crm Entities Tables
DECLARE @CrmEntityId int
INSERT INTO adn_CrmEntity (SchemaName,EntityVersion,FriendlyName,InitClass,LoadAssembly,NeedCreateBuilder,NeedExtendBuilder,NeedUIBuilder)
				VALUES ('adn_rating','1.0','Ratings','AddonNice.CRMWrapper.CrmRating.InstallRating','addonnice.dll',1,0,1)
SELECT @CrmEntityId = @@IDENTITY
-- Rating
INSERT INTO adn_ModuleEntity (EntityId,ModuleDefId) VALUES (@CrmEntityId,'{893D0AF4-A50B-4657-8F28-456790B475F3}')
-- Rating Grid
INSERT INTO adn_ModuleEntity (EntityId,ModuleDefId) VALUES (@CrmEntityId,'{CB230AD6-573E-487a-BC3E-C14B96EDBD7B}')

INSERT INTO adn_CrmEntity (SchemaName,EntityVersion,FriendlyName,InitClass,LoadAssembly,NeedCreateBuilder,NeedExtendBuilder,NeedUIBuilder)
				VALUES ('adn_ratingdetail','1.0','Rating details','AddonNice.CRMWrapper.CrmRating.InstallRating','addonnice.dll',1,0,1)
SELECT @CrmEntityId = @@IDENTITY
-- Rating
INSERT INTO adn_ModuleEntity (EntityId,ModuleDefId) VALUES (@CrmEntityId,'{893D0AF4-A50B-4657-8F28-456790B475F3}')
-- Rating Grid
INSERT INTO adn_ModuleEntity (EntityId,ModuleDefId) VALUES (@CrmEntityId,'{CB230AD6-573E-487a-BC3E-C14B96EDBD7B}')

INSERT INTO adn_CrmEntity (SchemaName,EntityVersion,FriendlyName,InitClass,LoadAssembly,NeedCreateBuilder,NeedExtendBuilder,NeedUIBuilder)
				VALUES ('adn_ratinganswer','1.0','Rating answers','AddonNice.CRMWrapper.CrmRating.InstallRating','addonnice.dll',1,0,1)
SELECT @CrmEntityId = @@IDENTITY
-- Rating
INSERT INTO adn_ModuleEntity (EntityId,ModuleDefId) VALUES (@CrmEntityId,'{893D0AF4-A50B-4657-8F28-456790B475F3}')
-- Rating Grid
INSERT INTO adn_ModuleEntity (EntityId,ModuleDefId) VALUES (@CrmEntityId,'{CB230AD6-573E-487a-BC3E-C14B96EDBD7B}')
--InitCrm2.2.2.0000.sql
-- END

GO